import request from '@/utils/request'
/** *
 * 获取组织架构数据
 * **/
export function list() {
  return request({
    url: '/company/department'
  })
}

/**
 * 根据id删除部门
 * **/
export function del(id) {
  return request({
    url: `/company/department/${id}`,
    method: 'delete'
  })
}

export function add(data) {
  return request({
    url: '/company/department',
    method: 'post',
    data
  })
}

export function upd(data) {
  return request({
    url: `/company/department/${data.id}`,
    method: 'put',
    data
  })
}
